/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sunsite.dao;

import java.util.List;
import org.springframework.dao.DataAccessException;
import sunsite.po.News;

/**
 *
 * @author mg
 */
public interface NewsDao {

    /**
     * 取得最新的5条新闻，以发布时间排序
     * @param 
     * @return 最新的5条新闻集合
     * @throws org.springframework.dao.DataAccessException
     */
    List<News> getTop5News() throws DataAccessException;

    List<News> getNews(int pageNow, int newsType) throws DataAccessException;
    int getPageCount(int newsType) throws DataAccessException;

    News getNewsById(String id) throws DataAccessException;

}
